<!--{eval $_G['home_tpl_titles'] = array($album['albumname'], '{lang album}');}-->
<!--{eval $friendsname = array(1 => '{lang friendname_1}',2 => '{lang friendname_2}',3 => '{lang friendname_3}',4 => '{lang friendname_4}');}-->

<!--{if empty($diymode)}-->
<!--{template common/header}-->

<div id="pt" class="wp">
	<a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo;
	<a href="home.php">$_G[setting][navs][4][navname]</a> &rsaquo; 
	<a href="home.php?mod=space&do=album">{lang album}</a> &rsaquo; 
	<a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{$space[username]}{lang somebody_album}</a>
</div>

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<!--{else}-->
<!--{template home/space_header}-->
<!--{/if}-->

<div id="ct" class="wp cl">
	<div class="mn">
	
	
<!--{if empty($diymode)}-->

		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a></label>
			{hook/space_album_header}
		</div>
		<div class="bm">
		<!--{if $space[self]}-->
			<h1 class="mt"><img alt="album" src="{STATICURL}image/feed/album.gif" class="vm" /> {lang album} - $album[albumname]</h1>
			<div class="y ptm">
				{lang switch_pics}
				<select class="ps" onchange="gotoAlbum(this.value);">
					<option value=""></option>
					<!--{loop $albumlist $key $ablums}-->
						<!--{loop $ablums $akey $value}-->
						<option value="$value[albumid]" {if $value[albumid]==$id}selected="selected"{/if}>$value[albumname]</option>
						<!--{/loop}-->
					<!--{/loop}-->
				</select>
				<script type="text/javascript">
				function gotoAlbum(id) {
						if(id) window.location.href = 'home.php?mod=space&uid=$space[uid]&do=album&id='+id;
					}
				</script>
			</div>
			<ul class="tb cl">
				<li$actives[we]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=we">{lang friend_album}</a></li>
				<li$actives[me]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{lang my_album}</a></li>
				<li$actives[all]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=all">{lang view_all}</a></li>
				<li class="o"><a href="home.php?mod=spacecp&ac=upload&albumid=$album[albumid]">{lang upload_pic}</a></li>
				<!--{if $_G[referer]}-->
				<li class="y"><a href="$_G[referer]">&laquo; {lang previous_page}</a></li>
				<!--{/if}-->
			</ul>
		<!--{else}-->
			<!--{eval 
				$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&view=me\">{lang they_album}</a>";
				$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&id=$_GET[id]\">$album[albumname]</a>";
			}-->
			<!--{template home/space_menu}-->
		<!--{/if}-->
		
<!--{else}-->
		<div class="bm">
			<h1 class="mt">{lang album}</h1>
			<a href="home.php?mod=spacecp&ac=upload">{lang upload_pic}</a>
<!--{/if}-->



			<div class="tbmu cl">
				<!--{if $album[albumid]>0}-->
				<a href="home.php?mod=spacecp&ac=favorite&type=album&id=$album[albumid]&spaceuid=$space[uid]&handlekey=sharealbumhk_{$album[albumid]}" id="a_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr ofav">{lang favorite}</a>
				<a href="home.php?mod=spacecp&ac=share&type=album&id=$album[albumid]&handlekey=sharealbumhk_{$album[albumid]}" id="a_share" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr">{lang share}</a>
				<!--{/if}-->
				<div class="y">
					{hook/space_album_op_extra}
					<!--{if $space[self]}--><a href="{if $album[albumid] > 0}home.php?mod=spacecp&ac=album&op=edit&albumid=$album[albumid]{else}home.php?mod=spacecp&ac=album&op=editpic&albumid=0{/if}">{lang edit}</a><span class="pipe">|</span><!--{/if}-->
					<!--{if ($_G[uid] == $album[uid] || checkperm('managealbum')) && $album[albumid] > 0}-->
						<a href="home.php?mod=spacecp&ac=album&op=delete&albumid=$album[albumid]&uid=$album[uid]&handlekey=delalbumhk_{$album[albumid]}" id="album_delete_$album[albumid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a><span class="pipe">|</span>
					<!--{/if}-->
				</div>
				<!--{if $album['catname']}-->
				<span class="xg1">{lang system_cat}</span><a href="home.php?mod=space&do=album&catid=$album[catid]&view=all">$album[catname]</a><span class="pipe">|</span>
				<!--{/if}-->
				<!--{if $album[picnum]}-->{lang total} $album[picnum] {lang album_pics}<!--{/if}-->
				<!--{if $album['friend']}-->
				<span class="xg1"> &nbsp; {$friendsname[$value[friend]]}</span>
				<!--{/if}-->
			</div>

		<!--{if $list}-->
			<ul class="ptw ml mlp cl">
			<!--{loop $list $key $value}-->
				<li>
					<a href="home.php?mod=space&uid=$value[uid]&do=$do&picid=$value[picid]"><!--{if $value[pic]}--><img src="$value[pic]" alt="" /><!--{/if}--></a>
				</li>
			<!--{/loop}-->
			</ul>
			<!--{if $multi}--><div class="pgs cl">$multi</div><!--{/if}-->
		<!--{else}-->
			<p class="emp">{lang no_pics}</p>
		<!--{/if}-->


		</div>
	</div>
	<div class="sd">

<!--{if empty($diymode)}-->

		<div class="drag">
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>

		{subtemplate common/userabout}
<!--{else}-->
		{subtemplate home/space_userabout}
<!--{/if}-->
	</div>
</div>

<!--{if empty($diymode)}-->
<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>
<!--{/if}-->

<!--{template common/footer}-->